package com.mcflies.study.plugin.action;

import java.util.HashMap;
import java.util.Map;

import net.sf.json.JSONArray;

public class AutocompleteAction {
	private JSONArray resultArrObj;

	public String jsonQuery() {
		resultArrObj = new JSONArray();
		for(int i = 0;i < 21 ;i++){
			Map<String, Object> map = new HashMap<String, Object>();
			map.put("queryIndex", String.valueOf(i));
			map.put("queryResult", "查询结果" + i);
			resultArrObj.add(map);
		}
		return "AUTOCOMPLETE_JSONQUERY_RESULT";
	}

	public JSONArray getResultArrObj() {
		return resultArrObj;
	}

	public void setResultArrObj(JSONArray resultArrObj) {
		this.resultArrObj = resultArrObj;
	}
}
